package com.atguigu.utils;

import javax.servlet.http.HttpServletRequest;

public class WebUtils {
    public static String getPath(HttpServletRequest request) {
        String requestURI = request.getRequestURI();
        String queryString = request.getQueryString();
        if (queryString.contains("&pageNo")) {
            queryString = queryString.substring(0, queryString.indexOf("&pageNo"));
        }
        return requestURI+"?"+queryString;
    }
}
